package com.gtw.modules.base.controller;

import com.gtw.common.utils.R;
import com.gtw.modules.base.service.TbProvinecService;
import com.gtw.modules.entity.TbProvinec;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/** 省份Controller
 * Created by wuye on 2018/1/26.
 */
@RestController
@RequestMapping("/locl/proinec")
public class TbProinecController {

    @Autowired
    private TbProvinecService tbProvinecService;

    /**
     * 查询所有省份
     * @return
     */
    @GetMapping(value = "/list")
    public R findAll(){
        List<TbProvinec> list = tbProvinecService.findAll();
        return R.ok().put("list",list);
    }
}
